package com.cby.library.data.model

import com.google.gson.annotations.SerializedName

/**
 * 非当前版本的默认为none
 */
const val TYPE_NONE = "none"

/**
 * 列表类型 1 * n
 */
const val TYPE_GRID_1 = "grid_1"

/**
 * grid类型，2*n
 */
const val TYPE_GRID_2 = "grid_2"

/**
 * grid类型 4 *n
 */
const val TYPE_GRID_4 = "grid_4"

/**
 * 广告插图1
 */
const val TYPE_AD_1 = "ad_1"

/**
 * 广告插图2 * 1
 */
const val TYPE_AD_2 = "ad_2"

data class HomeBean(
    @SerializedName("banner")
    var banner: MutableList<BannerBean>? = null,
    @SerializedName("poster")
    var poster: MutableList<PosterBean>? = null,
    @SerializedName("modules")
    var modules: MutableList<ModuleBean>? = null,
    @SerializedName("float_ball")
    var floatBall: FloatBallBean? = null
)

data class BannerBean(
    var type:String,
    var title: String,
    var icon: String,
    var versionLimit: Int,
    var action: String
)

data class PosterBean(
    var type:String,
    var title: String,
    var icon: String,
    var versionLimit: Int,
    var action: String,
    var tip: Int
)

data class ModuleBean(

    @SerializedName("display_style")
    var displayStyle: String? = null,

    @SerializedName("module_type")
    var moduleType: String? = null,

    @SerializedName("title")
    var title: String? = null,

    /**
     * 是否显示标题的标识
     */
    @SerializedName("show_title")
    var showTitle: Int = 0,

    @SerializedName("action")
    var action: String? = null,

    /**
     * 是否显示更多菜单
     */
    @SerializedName("show_more")
    var showMore: Int = 0,

    @SerializedName("list")
    var list: MutableList<Any>? = null
)

data class FloatBallBean(
    val title: String,
    val icon: String,
    val show: Int,
    val action: String
)